import {BrowserModule} from '@angular/platform-browser';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {NgModule} from '@angular/core';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {HttpModule, JsonpModule} from '@angular/http';
import {Ng2BootstrapModule} from 'ngx-bootstrap';
import {AppRoutingModule} from './app-routing.module';
import {AppComponent} from './app.component';
import {OauthService} from './lib/service/oauth.service';
import {AdminGuard} from './lib/service/admin-guard.service';
import {MainGuard} from './lib/service/main-guard.service';
import {MemberGuard} from './lib/service/member-guard.service';
import {HttpService} from './lib/service/http.service';
import {AdminModule} from './admin/admin.module';
import {IndexModule} from './home/index.module';
import {MainModule} from './main/main.module';
import {MemberModule} from './member/member.module';
import {LocalStorageService} from './lib/service/local-storage.service';
import {SessionStorageService} from './lib/service/session-storage.service';
import { NgZorroAntdModule } from 'ng-zorro-antd';
import {NgProgressInterceptor, NgProgressModule} from "ngx-progressbar";
import {HTTP_INTERCEPTORS} from "@angular/common/http";
import {TuikeGuard} from "./lib/service/tuike-guard.service";
import {TuikeModule} from "./tuike/tuike.module";
import {TRoutingModule} from "./tuike/tuike-routing.module";


@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    FormsModule,
    ReactiveFormsModule,
    BrowserModule,
    FormsModule,
    HttpModule,
    AppRoutingModule,
    TRoutingModule,
    BrowserAnimationsModule,
    JsonpModule,
    IndexModule,
    MainModule,
    MemberModule,
    AdminModule,
    TuikeModule,
    Ng2BootstrapModule.forRoot(),
    NgZorroAntdModule.forRoot(),
    NgProgressModule
  ],
  providers: [
    OauthService,
    AdminGuard,
    MainGuard,
    MemberGuard,
    TuikeGuard,
    HttpService,
    LocalStorageService,
    SessionStorageService,
    { provide: HTTP_INTERCEPTORS, useClass: NgProgressInterceptor, multi: true }
  ],
  bootstrap: [AppComponent]
})
export class AppModule {

}
